<?php
/**
 * Created by b17
 * 2/17/12 7:16 PM
 */

namespace Managers\Naming;

class Image implements Policy
{
    protected $suffix = 'b';

    public function rename($file)
    {
        $dir = pathinfo($file, PATHINFO_DIRNAME);
        $name = pathinfo($file, PATHINFO_FILENAME);
        $ext = pathinfo($file, PATHINFO_EXTENSION);

        $newName = $dir . DIRECTORY_SEPARATOR . $name . $this->suffix . '.' . $ext;
        return \Managers\Utils::sanitizePath($newName);
    }
}
